<?php

namespace App\Model\Backs;

use EasySwoole\Spl\SplBean;

class BacksBean extends SplBean{

    protected $id;
    protected $username;
    protected $nickname;
    protected $password;
    protected $role_id;
    protected $created_at;
    protected $login_at;

    //toArrayWithMapping
//    protected function setKeyMapping():array{
//        return [
//            'username' => 'name',
//            'nickname' => 'nick'
//        ];
//    }

    public function getId(){
        return $this->id;
    }

    public function getUsername(){
        return $this->username;
    }

    public function getPassword(){
        return $this->password;
    }

//    protected function initialize(): void{
//        $this->created_at = Carbon::now();
//    }

}
